package com.supcon.exchangedata.repository.slave6;

import com.supcon.exchangedata.pojo.entity.mysql.operation.hj.HjCleanOrganized;
import com.supcon.exchangedata.pojo.entity.mysql.operation.hj.HjZckcData;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

public interface SlaveHjZckcDataInfo extends JpaRepository<HjZckcData, String> {
    /**
     * 获取实时数据
     */
    @Transactional
    @Query(nativeQuery = true, value = "SELECT * FROM hj_zckc_data WHERE biz_time=(SELECT MAX(biz_time) FROM hj_zckc_data)")
    HjZckcData acquireRealTimeData();
}
